package org.smr.ministore.dao;


import org.apache.ibatis.annotations.Param;
import org.blade.utils.Pager;
import org.smr.ministore.entities.Goods;
import org.apache.ibatis.annotations.Mapper;
import org.blade.dao.base.BaseMapper;
import org.blade.dao.base.PageQueryMapper;

import java.util.List;


/**
*
**/
@Mapper
public interface GoodsMapper extends BaseMapper<Long, Goods>,PageQueryMapper<Long,Goods> {

    /**
    * 逻辑删除
    * @param id
    *
    */
    int deleteByIdLogical(@Param("id")Long id);

    /**
     * 根据业务主键查询
     *
     * @param goods Goods 商品
     * @return Goods
     */
    Goods selectByPrimaryKey(@Param("entity") Goods goods);


    List<Goods> queryGoodsPagination(@Param("entity") Goods goods,  @Param("organList") List<Long> organIds,  @Param("page") Pager<Goods> pager);
}